<?php
/**
* Interface for Shuffler_Model_Tree_Interface
* 
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* 
* @copyright Copyright (c) 2008-2009 Ne8, LLC <josh.ribakoff@gmail.com>
* @license New BSD License
* @version 0.1
* @category Shuffler
* @package Shuffler_Model
* @subpackage Tree
*/
interface Shuffler_Model_Tree_Node_Interface
{
    /**
    * Add a child node
    * 
    * @param an instance of Shuffler_Model_Tree_Node_Interface
    */
    public function addChild( Shuffler_Model_Tree_Node_Interface $node );

    /**
    * Get this node's parent node
    * 
    * @return an instance of Shuffler_Model_Tree_Node_Interface
    */
    public function getParent();

    /**
    * Set this node's parent to a node
    * 
    * @param Shuffler_Model_Tree_Node_Interface
    */
    public function setParent( Shuffler_Model_Tree_Node_Interface $node );

    /**
    * Check if the node has children nodes
    * @return boolean
    */
    public function hasChildren();
    
    /**
    * Get direct descendants
    * 
    * If you want all descendants, use the getDescendants() method. 
    * 
    * @return array of children
    */
    public function getChildren();
    
    /**
    * returns all descendants
    * 
    * @return array of descendants
    */
    public function getDescendants();
    
    /**
    * Get title of node
    * 
    * @return string title
    */
    public function getTitle();
       
}